// PIXI Global Namespace Setup
// This file creates a global PIXI namespace to support older PIXI plugins like @pixi/filter-bulge-pinch v5.x

import * as PIXI_APP from '@pixi/app';
import * as PIXI_CORE from '@pixi/core';
import * as PIXI_DISPLAY from '@pixi/display';
import * as PIXI_SPRITE from '@pixi/sprite';
import * as PIXI_FILTER_BLUR from '@pixi/filter-blur';
import * as PIXI_FILTER_COLOR_MATRIX from '@pixi/filter-color-matrix';

// Import the bulge-pinch filter - this will ensure it's loaded and available
import '@pixi/filter-bulge-pinch';

// Create the global PIXI namespace
const PIXI = {
  ...PIXI_CORE,
  ...PIXI_APP,
  ...PIXI_DISPLAY,
  ...PIXI_SPRITE,
  filters: {
    ...PIXI_FILTER_BLUR,
    ...PIXI_FILTER_COLOR_MATRIX,
  }
};

// Make PIXI available globally
if (typeof window !== 'undefined') {
  (window as any).PIXI = PIXI;
}

if (typeof globalThis !== 'undefined') {
  (globalThis as any).PIXI = PIXI;
}

export default PIXI;